package com.ruoyi.project.common;

import com.ruoyi.project.system.domain.User;
import com.ruoyi.project.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;

public class UserManager {

    @Autowired
    private IUserService userService;

    private static UserManager manager;
    private UserManager()
    {

    }

    public static UserManager getManager() {
        if(null == manager)
        {
            manager = new UserManager();
        }
        return manager;
    }

    public User getInfoFromUid(String uid)
    {
        return userService.selectUserById(Long.parseLong(uid));
    }
}
